<?php

    namespace App\Admin\Tools\StuffWages;

    use App\Models\AdminUsersRelatedModel;
    use App\Models\StuffWagesModel;
    use Encore\Admin\Grid\Tools\AbstractTool;

    class StuffWagesEditTool extends AbstractTool
    {
        private int $id;

        public function __construct(int $id)
        {
            $this->id = $id;
        }

        /**
         * @inheritDoc
         */
        public function render()
        {
            return view('stuffWages.edit', [
                'id' => $this->id,
                'data' => StuffWagesModel::query()->where('id', $this->id)->first(),
                'stuff' => (new AdminUsersRelatedModel)->stuff()
            ]);
        }
    }
